
const { apiPreFix } = require('../config').server
const statistics = require('../controllers/admin/statistics')
module.exports = (router) => {
  // 插入统计数据
  router.post(`${apiPreFix}/statistics/append`, async ctx => {
    await statistics.append(ctx)
  })
  // 获取首页数据集
  router.get(`${apiPreFix}/statistics/allData`, async ctx => {
    await statistics.allData(ctx)
  })
  // 明细
  router.get(`${apiPreFix}/statistics/list`, async ctx => {
    await statistics.list(ctx)
  })
  /*
   * 获取app下载链接
   */
  router.get(`${apiPreFix}/appdown`, async ctx => {
    await statistics.getAppDownLink(ctx)
  })
}